

public class NYUStudent extends NYUPerson{
    private static int NumOfObjects = 0;
    double gpa;

    public NYUStudent(String name, double gpa) {
        super(name);
        this.gpa = gpa;
        NumOfObjects++;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        NYUStudent that = (NYUStudent) o;
        return Double.compare(that.gpa, gpa) == 0;
    }

    public static int getNumOfObjects() {
        return NumOfObjects;
    }

}

class NYUPerson {
    private String name;

    public NYUPerson(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
